partitioned matrices formula